package com.ddwang;

import com.ddwang.proxy.JdkDynamicAopProxy;
import com.ddwang.proxy.ProxyCreator;
import com.ddwang.service.IUserService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
public class WebfluxlearnApplication {
    @Bean
    ProxyCreator JdkDynamicAopProxy() {
        return new JdkDynamicAopProxy();
    }
    @Bean
    public IUserService getObject(ProxyCreator proxyCreator) throws Exception {
        return ((IUserService) proxyCreator.createProxy(IUserService.class));
    }
    public static void main(String[] args) {
        SpringApplication.run(WebfluxlearnApplication.class, args);
    }

}
